import java.util.Scanner;

public class test48 {
    //金额转换 将数字转化为金额数值大写
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int money;
        while(true){
            System.out.println("请输入金额");
            money = sc.nextInt();
            if(money>=0 && money<9999999){
               break;
            }
            else{
                System.out.println("输入的金额无效");
            }
        }
        String str1 = "";
        int count = 0;
        while(true){
            int ge=money%10;
            String captialnumber = getCapitalNumber(ge);
            str1 = captialnumber+str1;
           money=money/10;
           count++;
            if(money == 0){
                break;
            }
        }for(int i=1;i<7-count+1;i++){
            str1 = "零" + str1;
        }
        String result="";
        String[] arr ={"佰","拾","萬","仟","佰","拾","元"};
        for (int i = 0; i <str1.length() ; i++) {
            char ch = str1.charAt(i);
            result=result+ch+arr[i];
        }
        System.out.println(result);
    }

    public static String getCapitalNumber(int number) {
        String[] str = {"零","壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
        return str[number];

    }
}
